package com.xhwl.logistics.converter.mapstruct.logistics;


import com.xhwl.logistics.entity.approval.ApprovalProcess;
import com.xhwl.logistics.entity.approval.ApprovalProgress;
import com.xhwl.logistics.vo.logistics.approval.ApprovalProgressVO;
import org.mapstruct.IterableMapping;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface ApprovalProgressConvert {
    ApprovalProgressConvert INSTANCE = Mappers.getMapper(ApprovalProgressConvert.class);

    ApprovalProgress toPoConvert(ApprovalProgressVO source);

    ApprovalProgressVO toVoConvert(ApprovalProgress po);

    @IterableMapping(elementTargetType = ApprovalProcess.class)
    List<ApprovalProgress> toPoConvertList(List<ApprovalProgressVO> source);

    @IterableMapping(elementTargetType = ApprovalProgressVO.class)
    List<ApprovalProgressVO> toVoConvertList(List<ApprovalProgress> source);

}
